<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:inline="javascript">
    /*<![CDATA[*/
    var username = '${#r}';
    /*]]>*/
    </script>
</head>
<body>

</body>
</html>